package com.longchat.domain.system;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the T_MENU database table.
 * 
 */
@Entity
@Table(name="T_MENU")
@NamedQuery(name="Menu.findAll", query="SELECT m FROM Menu m")
public class Menu implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="T_MENU_ID_GENERATOR" )
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="T_MENU_ID_GENERATOR")
	@Column(unique=true, nullable=false, precision=22)
	private long id;

	@Column(length=200)
	private String code;

	@Column(name="CREATE_ID", precision=22)
	private BigDecimal createId;

	@Temporal(TemporalType.DATE)
	@Column(name="CREATE_TIME")
	private Date createTime;

	@Column(length=200)
	private String icon;

	@Column(name="IS_SHOW", length=1)
	private String isShow;

	@Column(name="MENU_LEVEL", precision=22)
	private BigDecimal menuLevel;

	@Column(length=50)
	private String name;

	@Column(name="PARENT_ID", precision=22)
	private BigDecimal parentId;

	@Column(length=200)
	private String remark;

	@Column(name="SORT_ID", precision=22)
	private BigDecimal sortId;

	@Column(length=1)
	private String style;

	@Column(name="UPDATE_ID", precision=22)
	private BigDecimal updateId;

	@Temporal(TemporalType.DATE)
	@Column(name="UPDATE_TIME")
	private Date updateTime;

	@Column(length=200)
	private String url;

	//bi-directional many-to-many association to Role
	@ManyToMany(mappedBy="TMenus")
	private List<Role> TRoles;

	public Menu() {
	}

	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public BigDecimal getCreateId() {
		return this.createId;
	}

	public void setCreateId(BigDecimal createId) {
		this.createId = createId;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getIcon() {
		return this.icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getIsShow() {
		return this.isShow;
	}

	public void setIsShow(String isShow) {
		this.isShow = isShow;
	}

	public BigDecimal getMenuLevel() {
		return this.menuLevel;
	}

	public void setMenuLevel(BigDecimal menuLevel) {
		this.menuLevel = menuLevel;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public BigDecimal getParentId() {
		return this.parentId;
	}

	public void setParentId(BigDecimal parentId) {
		this.parentId = parentId;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public BigDecimal getSortId() {
		return this.sortId;
	}

	public void setSortId(BigDecimal sortId) {
		this.sortId = sortId;
	}

	public String getStyle() {
		return this.style;
	}

	public void setStyle(String style) {
		this.style = style;
	}

	public BigDecimal getUpdateId() {
		return this.updateId;
	}

	public void setUpdateId(BigDecimal updateId) {
		this.updateId = updateId;
	}

	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public List<Role> getTRoles() {
		return this.TRoles;
	}

	public void setTRoles(List<Role> TRoles) {
		this.TRoles = TRoles;
	}

}